//@author A0103459H
#pragma once
#include <string>
#include <time.h>
#include <sstream>
#include <ctime>
#include <iostream>
#include<iomanip>
#include "DateTime.h"


using namespace std;
class Task
{
private:
	string _TaskName;
	//-------------------------------
	string _StartTime;  
	string _EndTime;   
	/*
	DateTime _start;
	DateTime _end;*/
	//---------------------------------------
	string _Venue;
	bool _isDone;	//also referred as the status.
	int _TaskType;

	DateTime _start; //Quang's addition for DateTime type 
	DateTime _end;
public:
	Task();
	// Quang's comment: This constructor remains the same 
	Task(string taskName, string StartTime, string EndTime, string Venue);
	//Task(string taskName, string StartTime, string EndTime, string Venue, bool Status);
	~Task(void);

	const static int FLOATING_TASK	= 0;
	const static int TIMED_TASK		= 1;
	const static int DEADLINE_TASK	= 2;


	string getTaskName();
	string getStartTime();
	string getEndTime();
	string getVenue();
	bool getIsDone();
	string getStatus();

	DateTime getStart ();
	DateTime getEnd ();
	//----------------------------------------
	bool isClashingWith (Task another);
	//------------------ to be implemented 

	void setTaskName(string taskName);
	void setStartTime(string startTimeString);
	void setEndTime(string endTimeString);
	void setVenue(string Venue);
	void setStatus(string status);
	void setTaskType();		//No input required as the Tasktype is determined by itself. 

	int determineTaskType();	
	

	string getStartDateString();	// format DD/MM/YYYY
	string getStartTimeString();	// format HHMM (24hrs format)
	string getEndDateString();		// format DD/MM/YYYY
	string getEndTimeString();		// format HHMM (24hrs format)
	int getTaskType();				// 0 : floating ; 1 : timed ; 2 : deadline


	string dateStringFromTime_t(time_t timeVar);
	string timeStringFromTime_t(time_t timeVar);
	string dayStringFromTime_t(time_t timeVar);

	DateTime createDateTimefromString (string input);
	string outputAllTaskInfo();
 	bool operator<(Task& a);

};

